<template>
  <div >
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/waiter' }" style="font-size:18px">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/tip'}" style="font-size:18px">公告栏</el-breadcrumb-item>
      </el-breadcrumb>

    <div style="float: left;width: 50%;">
      <el-table
        :data="tableData1"
        stripe
        style="width: 100%">
        <el-table-column
          prop="notice"
          label="点餐公告"
          width="450"
          router="true"
          >
            <template slot-scope="scope">
               <a href="/order" target="_self" class="buttonText">{{scope.row.notice}}</a>
             </template>
        </el-table-column>

        <el-table-column
          prop="date1"
          label="时间"
          width="100">
        </el-table-column>
      </el-table>
    </div>

    <div style="margin-left: 50%; width: 50%;">
        <el-table
            :data="tableData2"
            stripe
            style="width: 100%">
            <el-table-column
              prop="msg"
              label="上菜公告"
              width="450">
                <template slot-scope="scope">
                   <a >{{scope.row.msg}}</a>
                 </template>
            </el-table-column>

            <el-table-column
              prop="date2"
            label="时间"
              width="100">
              
            </el-table-column>
          </el-table>
      </div>
</div>
</template>

<script>
import {requestData} from "../../ajax";
  export default {
    data:function() {
      return {
        tableData1: [],
        tableData2: []
      }
    },
    mounted:function(){
        // 准备条件
        var request_data = new FormData();
        // 请求数据
        requestData("get","tip.json", request_data).then((resp)=>{
            // 赋值数据到linesdata
            var result = resp.data;
            this.tableData1 = result["order_tip"];
            this.tableData2=result["上餐公告"];
        });
        
    },

  }
</script>

<style>
  a{
    color: #7ac804;
  }
  .el-breadcrumb{
    margin-bottom: 15px;
    font-size:15px;
}
</style>